/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package account;

/**
 *
 * @author Shroom
 */
public class Account {
    private float amount;
    private float balance;
    public Account(){
        amount = 0;
        balance = 0;
    }
    public Account(int a, int b){
        amount = a;
        balance = b;
    }
    public float deposit(){
        if(amount > 0)
            System.out.println("The current balance is: " + balance);
        else
            System.out.println("Please enter the amount you wish to deposit into your account");
        return(balance = balance + amount);
    }
    public float withdraw(){
        if(amount < balance)
            System.out.println("The current balance is: " + balance);
        else
            System.out.println("You cannot withdraw more than your current balance. Your current balance is: " + balance);
        return(balance = balance - amount);
    }
    public void getBalance(){
        System.out.println("The current balance is: " + balance);
    }
    public void setAmount(float amount){
        this.amount = amount;
    }
}
